#ifndef __GRAPHICS_ITEM_QUESTION_H
#define __GRAPHICS_ITEM_QUESTION_H

#include "tableschema.h"

class MemoryGame;
class QGraphicsItemQuestion : public QObject, public QGraphicsRectItem
{
    Q_OBJECT

public:
    QGraphicsItemQuestion( int x, int y, int width, int height, MemoryGame & parent, const Question & question );
    virtual ~QGraphicsItemQuestion();
    qint64 questionId() const;
    void setQuestionStatus( QuestionStatus::Enum questionStatus );

private:
    virtual void paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );
    virtual void mouseDoubleClickEvent( QGraphicsSceneMouseEvent * event );

private:
    MemoryGame & m_parent;
    Question m_question;

    static QBrush m_backroundBrushNotAnswered;
    static QBrush m_backroundBrushBadAnswered;
    static QBrush m_backroundBrushOkAnswered;
    static QFont m_font;
};

#endif
